//<editor-fold desc="node core modules">
var path = require('path');
//</editor-fold>

//<editor-fold desc="npm module">
var expect = require('expect.js');
var _ = require('underscore');
var exec = require('child_process').exec;
require('shelljs/global');

var NL = require('nllib');
//</editor-fold>

describe('archive-test', function () {
    it('test.sh 01', function (done) {
        exec('bash test.sh 01', function (err, stdout, stderr) {
            // NL.lformat('stdout---begin');
            // NL.lformat(stdout);
            // NL.lformat('stdout---end');

            var srcList = [
                './archive-test/test/test-01/packages/package.zip',

                './archive-test/test/test-01/packages/unzip-package/222.txt',
                './archive-test/test/test-01/packages/unzip-package/333.txt',
                './archive-test/test/test-01/packages/unzip-package/444.txt',
            ];

            _.each(srcList, function (src) {
                var flag = test('-e', src);

                NL.lformat('{0} exists ===> {1}', src, flag);

                expect(flag).to.eql(true);
            });

            done();
        });
    });
});




